/**
 * 测试read函数；
 * @author: sundx
 * @date: 2020-05-30 22:04:54
 * @Last Modified by:   sundx
 * @Last Modified time: 2020-05-30 22:04:54
 */
#include <fcntl.h>
#include <iostream>
#include <unistd.h>
int main() {
  char buff[1024];
  int fd = open("makefile", O_RDONLY);
  read(fd, buff, 1024);
  std::cout << buff << std::endl;
  close(fd);
}